package com.sikaryofficial.backend.domain.mapping;

import com.sikaryofficial.backend.domain.dto.req.UserActionReq;
import com.sikaryofficial.backend.domain.dto.resp.collection.UserActionActivityResp;
import com.sikaryofficial.backend.domain.dto.resp.collection.UserActionArticleResp;
import com.sikaryofficial.backend.domain.dto.resp.collection.UserActionEvaluateResp;
import com.sikaryofficial.backend.domain.dto.resp.collection.UserActionProductResp;
import com.sikaryofficial.backend.domain.dto.resp.collection.UserActionStoreResp;
import com.sikaryofficial.backend.domain.entity.UserAction;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @author : qinjinyuan
 * @desc : 用户实体映射
 * @date : 2023/11/09 11:04
 */
@Mapper
public interface UserActionMapping {

    UserActionMapping INSTANCE = Mappers.getMapper(UserActionMapping.class);

    /**
     * 将前端请求参数转换为实体类
     *
     * @param req
     * @return
     */
    UserAction coverToEntity(UserActionReq req);

    /**
     * 将实体类转换为前端响应参数
     *
     * @param req
     * @return
     */
    UserActionStoreResp coverToStoreResp(UserAction req);

    /**
     * 将实体类转换为前端响应参数
     *
     * @param req
     * @return
     */
    UserActionProductResp coverToProductResp(UserAction req);

    UserActionArticleResp coverToArticleResp(UserAction req);

    /**
     * 将实体类转换为前端响应参数
     *
     * @param req
     * @return
     */
    UserActionActivityResp coverToActivityResp(UserAction req);

    /**
     * 将实体类转换为前端响应参数
     *
     * @param req
     * @return
     */
    UserActionEvaluateResp coverToEvaluateResp(UserAction req);

}
